package com.boot.result;


public enum ResultCodeNum {
    SUCCESS(200, "success"),

    //登录注册相关错误代码
    NOTLOGIN(10001, "please login first"),
    USERNAME_ERROR(10002, "username error"),
    PASSWORD_ERROR(10003, "password error"),
    USERNAME_OR_PASSWORD_ERROR(10004, "username or password error"),
    USERNAME_OR_PASSWORD_MISSING(10005, "username or password missing"),
    USERNAME_EXIST(10006, "username exist"),
    PASSWORD_TOO_SHORT(10007, "password too short"),
    REGISTER_ERROR(10008, "register error, please try again"),
    ACCOUNT_LOCKED(10009, "account locked"),

    //员工相关错误代码
    EMPLOYEE_NOT_EXIST(20001, "employee not exist"),
    EMPLOYEE_OLD_PASSWORD_ERROR(20002, "employee old password error"),
    EMPLOYEE_CHANGE_PASSWORD_ERROR(20003, "employee change password error"),

    //菜品相关
    DISH_ON_SALE(30001, "have dish on sale"),
    CHANGE_SALE_STATUS_ERROR(30002, "change sale status error"),
    UPDATE_DISH_ERROR(30003, "update dish error"),

    //套餐相关
    SETEMEAL_INSERT_ERROR(40001, "setmeal insert error"),



    //通用
    SYSTEM_ERROR(70000, "system error, please try again"),
    INSERT_ERROR(70001, "insert error, please try again"),
    UPDATE_ERROR(70002, "update error, please try again"),
    DELETE_ERROR(70002, "delete error, please try again"),
    UPLOAD_FILE_FAILED(70003, "upload file failed, please try again"),
    DELETE_FILE_FAILED(70003, "upload file failed, please try again");

    private Integer code;
    private String msg;

    ResultCodeNum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    ;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
